//
//  CXAFNHttpRequestUtils.h
//  base_test
//
//  Created by  androidlongs on 17/8/15.
//  Copyright © 2017年  androidlongs. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, CXHttStatuCode) {
    CXHttStatuCodeSuccess = 1000,
    CXHttStatuCodeNoNet = 1001,
    CXHttStatuCodeFaile = 1002,
    
};


@interface CXAFNHttpRequestUtils : NSObject

//post请求
+(void) httpPostRequest:(NSString *) url withParamters:(NSDictionary*) dic success:(void(^)(id responseData)) success failure:(void(^)(NSError* error,NSInteger errCode)) failure;
//get请求 有参数
+(void) httpGetRequest:(NSString *) url withParamters:(NSDictionary*) dic success:(void(^)(id responseData)) success failure:(void(^)(NSError* error,NSInteger errCode)) failure;
//get请求 无参数
+(void) httpGetRequest:(NSString *) url success:(void(^)(id responseData)) success failure:(void(^)(NSError* error,NSInteger errCode)) failure;
+(CXAFNHttpRequestUtils * ) sharedHttpRequestUtils;

//上传单张图片
+(void)httpPostFileRequestWithParamters:(NSDictionary *)dic withImage:(UIImage*)image success:(void (^)(id))success failure:(void (^)(NSError * error, NSInteger code))failure;
//上传多张图片 集合保存image
+(void)httpPostFileRequestWithParamters:(NSDictionary *)dic withImageArray:(NSMutableArray*)imageArray success:(void (^)(id))success failure:(void (^)(NSError * error, NSInteger code))failure;
@end
